﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class init : MonoBehaviour
{
    public GameObject black;
    public GameObject write;
    public const float scale = 0.2f;
    // Start is called before the first frame update
    void Start()
    {
        ////创建地图
        ////国际象棋的左下必须是黑色 设左下为1,1
        //for (int i = 1; i <= 8; i++)
        //{
        //    for (int j = 1; j <= 8; j++)
        //    {
        //        if (((i % 2) == 1) && ((j % 2) == 1) || ((i % 2) == 0) && ((j % 2) == 0))
        //        {
        //            GameObject myBlack = Instantiate(black);
        //            myBlack.transform.position = new Vector3((scale * i),
        //                0, (scale * j));
        //            ;
        //        }
        //        else if (((i % 2) == 1) && ((j % 2) == 0) || ((i % 2) == 0) && ((j % 2) == 1))
        //        {
        //            GameObject myWrite = Instantiate(write);
        //            myWrite.transform.position = new Vector3((scale * i),
        //                0, (scale * j));
        //        }
        //        else
        //        {
        //            Debug.Log("地图创建失败！");
        //        }

        //    }
        //}
    }

    // Update is called once per frame
    void Update()
    {

    }
}
